package com.dupengcheng.subject.common.enums;

import lombok.Getter;

@Getter
public enum SubjectTypeEnum {


    RADIO(1,"单选"),
    MULTIPLE(2,"多选"),
    JUDGE(3,"判断"),
    BRIEF(4,"简答");

    private Integer code;


    private String desc;

    SubjectTypeEnum(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static SubjectTypeEnum getByCode(Integer code){
        for(SubjectTypeEnum resultCodeEnum : SubjectTypeEnum.values()){

            if (resultCodeEnum.getCode().equals(code)){
                return resultCodeEnum;
            }
        }
            return null;
    }
}
